#define _CRT_SECURE_NO_WARNINGS	1
struct ListNode* middleNode(struct ListNode* head)
{
    struct ListNode* dummy = malloc(sizeof(struct ListNode));
    dummy->next = head;
    struct ListNode* fast = dummy;
    struct ListNode* slow = dummy;
    while (fast)
    {
        slow = slow->next;
        if (fast->next)
            fast = fast->next->next;
        else
            return slow;
    }
    return slow;
}
